<?php
// 不区分大小写的常量名
define("GREETING", "欢迎访问 Runoob.com");
echo GREETING;  // 输出 "欢迎访问 Runoob.com"
echo '<br>';
echo PHP_VERSION; // 输出 PHP 版本，例如 "7.4.1"
echo '<br>';
echo PHP_OS;      // 输出操作系统，例如 "Linux"
echo '<br>';
echo PHP_INT_MAX; // 输出最大的整数值，例如 "9223372036854775807"

echo '<br>';
define("FRUITS", [
    "Apple",
    "Banana",
    "Orange"
]);

echo FRUITS[0]; // 输出 "Apple"


echo '<br>';
echo "hello" . " " . "php";

echo '<br>';
echo date("Y/m/d H:i:s");

echo '<br>';
$cars = array("Volvo", "BMW", "Toyota");
echo count($cars);
echo '<br>';
for ($i = 0; $i < count($cars); $i++) {
    echo $cars[$i];
    echo '<br>';
}

echo '<br>';
$age = array("Peter" => "35", "Ben" => "37", "Joe" => "43");

foreach ($age as $x => $x_value) {
    echo "Key=" . $x . ", Value=" . $x_value;
    echo "<br>";
}

echo "<br>";
$numbers = array(4, 6, 2, 22, 11);
sort($numbers);
echo "排序后的值: ";
foreach ($numbers as $value) {
    echo "$value ";
    echo "<br>";
}

$aaa = 12;
echo gettype($aaa);

echo "<br>";

echo time();

echo "<br>";

echo round(microtime(true)*1000);